<?php $this->headTitle('Đăng nhập'); ?>

<?php
$loginForm->setAttribute('action', $this->url('user-admin', array('action' => 'login')));

$loginForm->setAttribute('class', 'form-horizontal');

$loginForm->prepare();

echo $this->form()->openTag($loginForm);
?>

<?php
if(isset($message)){
    echo $message;
}
?>


<div class="form-group">
    <?php echo $this->formLabel($loginForm->get('user_name')); ?>
    <div class="col-md-4">
        <?php echo $this->formInput($loginForm->get('user_name')); ?>
        <?php if ($this->formElementErrors($loginForm->get('user_name'))) { ?>
            <div class="alert-danger" style="margin-top: 10px;">
                <?php echo $this->formElementErrors($loginForm->get('user_name')); ?>
            </div>
        <?php } ?>
    </div>
</div>
<div class="form-group">
    <?php echo $this->formLabel($loginForm->get('user_password')); ?>
    <div class="col-md-4">
        <?php echo $this->formPassword($loginForm->get('user_password')); ?>
        <?php if ($this->formElementErrors($loginForm->get('user_password'))) { ?>
            <div class="alert-danger" style="margin-top: 10px;">
                <?php echo $this->formElementErrors($loginForm->get('user_password')); ?>
            </div>
        <?php } ?>
    </div>
</div>
<div class="form-group">
    <?php echo $this->formLabel($loginForm->get('remember_me')); ?>
    <div class="col-md-4">
        <?php echo $this->formCheckbox($loginForm->get('remember_me')); ?>
        <?php if ($this->formElementErrors($loginForm->get('remember_me'))) { ?>
            <div class="alert-danger" style="margin-top: 10px;">
                <?php echo $this->formElementErrors($loginForm->get('remember_me')); ?>
            </div>
        <?php } ?>
    </div>
</div>
<div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
        <?php echo $this->formSubmit($loginForm->get('login')); ?>
    </div>
</div>